package com.example.hhh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.hhh.model.pojo.Workorder;
import com.example.hhh.model.vo.WorkorderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author 20642
* @description 针对表【workorder】的数据库操作Mapper
* @createDate 2025-06-20 10:01:06
* @Entity com.example.hhh.model.pojo.Workorder
*/
@Mapper
public interface WorkorderMapper extends BaseMapper<Workorder> {

    /**
     * 分页查询工单信息（包含客户和业务信息）
     */
    IPage<WorkorderVO> selectWorkorderPageWithDetails(Page<WorkorderVO> page, @Param("search") String search, 
                                                      @Param("status") Integer status, @Param("priority") Integer priority);

    /**
     * 根据ID查询工单详细信息（包含客户和业务信息）
     */
    WorkorderVO selectWorkorderWithDetails(@Param("orderId") Integer orderId);
}




